-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monomers ports #1
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly minor comments, everything looks great. Just a couple questions: is SimulariumEmitter
no longer used anywhere? Is there a corresponding SimulariumFilamentEmitter
to the SimulariumMonomerEmitter
? I think we should aim for a general SimulariumEmitter, so that it can handle all possible cases -- if we use only emitters that are specialized for a single data type, the simulation won't be able to stream the other data types that might be available.
} | ||
}, | ||
} | ||
return monomer_ports_schema |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, I like this reuse of schema.
self.system.potentials.add_harmonic_repulsion( | ||
type1, | ||
type2, | ||
force_constant=self.parameters["force_constant"], | ||
interaction_distance=( | ||
self.parameters["particle_radii"][type1] | ||
+ self.parameters["particle_radii"][type2] | ||
self.parameters["particle_radii"].get(type1, 1.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should use a default size set in self.parameters
instead of a hardcoded 1.0
?
import numpy as np | ||
|
||
|
||
monomer_ports_schema = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would name this file schema.py
instead of utils
. It seems like a file that could be expanded upon with more schemas for reuse.
Problem
We're working on visualizing a simple ReaDDy model (simularium/vivarium-models#19) in Simularium as it calculates live, and we need updates to the ports structure and emitter in order to convert data for SImularium in the same way we visualize actin models from ReaDDy.
Solution
Updated the ports structure to match other ReaDDy processes, made implementation more general wrt scale and system, and updated the emitter accordingly.
Type of change
Change summary: